#!/usr/bin/env python
# -*- encoding:utf-8 -*-
#**
#-------------------------------------------------------------------------------
#[Subject   -- SQL_Gen]
#[Author    -- tianxu.xxf]
#[Created   -- 2010.9.28]
#[Updated   -- ]
#[UpAuthor  -- ]
#-----------------------------------------------------------------------------*#
from Const._Operator import AND, OR, NOT

def NOT(condition):
    return Condition(condition,NOT)

class Condition:
    """"""

    def __init__(self, item1, op, item2=None):
        self.__item1 = item1
        self.__op    = op
        self.__item2 = item2

    def AND(self, item):
        return Condition(self,AND,item)

    def OR(self, item):
        return Condition(self,OR,item)
